<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center myNew_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub myNew_fd0_0'>
                    <view class='flex flex-wrap align-center myNew_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  myNew_fd0_0_c0_c0'>&#xE794;</text>
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                        <text class='myNew_fd0_0_c1_c0'>我的消息</text>
                    </view>
                    <view class='flex flex-wrap align-center justify-end myNew_fd0_0_c0'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction align-stretch benben-flex-layout myNew_flex_1">
                <view class='flex flex-wrap align-center myNew_fd1_0' v-for="(item,index) in detail" @tap.stop="tiaozhuan(item)">
                    <view class='flex flex-wrap align-center myNew_fd1_0_c0'>
                        <image class='myNew_fd1_0_c0_c0' mode="aspectFill" :src='item.thumb'></image>
                        <benben-message-num class='myNew_fd1_0_c0_c1' :message-num="item.num" size='24' color='#fff' background-color='red'>
                        </benben-message-num>
                    </view>
                    <view class='flex flex-direction align-stretch flex-sub'>
                        <view class='flex flex-wrap align-center justify-between myNew_fd1_0_c1_c0'>
                            <text class='myNew_fd1_0_c1_c0_c0'>{{item.name}}</text>
                            <text class='myNew_fd1_0_c1_c0_c1'>{{item.msg_time}}</text>
                        </view>
                        <text class='myNew_fd1_0_c1_c1' v-if="item.new_msg">{{item.new_msg}} </text>
                        <text class='myNew_fd1_0_c1_c2' v-else>暂无消息</text>
                    </view>
                </view>
                <!-- <view class='flex flex-wrap align-center myNew_fd1_0' @tap.stop="handleJumpDiy" data-type="navigateTo" 
					:data-url="`/pages/index/orderMessage/orderMessage`">
                    <view class='flex flex-wrap align-center myNew_fd1_0_c0'>
                        <image class='myNew_fd1_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"25.png"'></image>
                        <benben-message-num class='myNew_fd1_0_c0_c1' :message-num="detail.two.new_msg_num" size='24' color='#fff' background-color='red'>
                        </benben-message-num>
                    </view>
                    <view class='flex flex-direction align-stretch flex-sub'>
                        <view class='flex flex-wrap align-center justify-between myNew_fd1_0_c1_c0'>
                            <text class='myNew_fd1_0_c1_c0_c0'>订单消息</text>
                            <text class='myNew_fd1_0_c1_c0_c1'>{{detail.two.new_time}}</text>
                        </view>
                        <text class='myNew_fd1_0_c1_c1' v-if="detail.two.new_msg">{{detail.two.new_msg}}</text>
                        <text class='myNew_fd1_0_c1_c2' v-else>暂无消息</text>
                    </view>
                </view> -->
            </view>

            <!---flex布局flex布局结束-->


        </view>
    </page-body>
</template>
<script>
    import {
        validate
    } from '@/common/utils/validate.js'

    export default {
        components: {},


        data() {
            return {
                "detail": {
                    "one": {
                        "new_msg": "",
                        "new_msg_num": "",
                        "new_time": ""
                    },
                    "two": {
                        "new_msg": "",
                        "new_msg_num": "",
                        "new_time": ""
                    },
                    "count": {
                        "new_msg": "",
                        "new_msg_num": ""
                    }
                }
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {

        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {
            this.post649036bc049c1()
        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			tiaozhuan(item){
				if(item.typeid == 1){
					this.$urouter.navigateTo(`/pages/index/platform/platform`);
				}else if(item.typeid == 2){
					this.$urouter.navigateTo(`/pages/index/orderMessage/orderMessage`);
				}
			},
            //获取未读消息数量及最新消息
            async post649036bc049c1() {
                //请求方法
                //数据验证

                let datadetail = await this.$api.get(global.apiUrls.post649036bc049c1, {
					type: uni.getStorageSync('tabberType') == 2 ? 3 : 1 
                });

                if (datadetail.data.code != 1) {
                    this.$message.info(datadetail.data.msg);
                    return
                }
                let infodetail = datadetail.data;
                this.detail = infodetail.data

            }
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: var(--benbenbgColor1);
        background-size: 100% auto;
    }

    .myNew_flex_0 {
        background: #fff;
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 10;
        top: 0rpx;
        background-size: 100% auto !important;
    }

    .myNew_fd0_0_c1_c0 {
        font-size: 36rpx;
        font-weight: 500;
        color: #333;
        line-height: 88rpx;
    }

    .myNew_fd0_0_c0_c0 {
        font-size: 36rpx;
        color: #333;
    }

    .myNew_fd0_0_c0 {
        width: 120rpx;
        height: 88rpx;
    }

    .myNew_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
        height: 88rpx;
    }

    .myNew_flex_1 {
        padding: 0rpx 32rpx 0rpx 32rpx;
    }

    .myNew_fd1_0_c1_c2 {
        line-height: 33rpx;
        font-size: 24rpx;
        font-weight: 400;
        color: #999999;
    }

    .myNew_fd1_0_c1_c1 {
        line-height: 33rpx;
        font-size: 24rpx;
        font-weight: 400;
        color: #999999;
        -webkit-line-clamp: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }

    .myNew_fd1_0_c1_c0_c1 {
        line-height: 33rpx;
        font-size: 24rpx;
        font-weight: 400;
        color: #999999;
        text-align: right;
        font-style: normal;
    }

    .myNew_fd1_0_c1_c0_c0 {
        line-height: 45rpx;
        font-size: 32rpx;
        font-weight: 700;
        color: #333333;
    }

    .myNew_fd1_0_c1_c0 {
        margin: 0rpx 0rpx 12rpx 0rpx;
    }

    .myNew_fd1_0_c0_c1 {
        position: absolute;
        top: 0rpx;
        right: 0rpx;
    }

    .myNew_fd1_0_c0_c0 {
        width: 90rpx;
        height: 90rpx;
    }

    .myNew_fd1_0_c0 {
        margin: 0rpx 32rpx 0rpx 0rpx;
        position: relative;
    }

    .myNew_fd1_0 {
        border-bottom: 1px solid #eee;
        padding: 40rpx 0rpx 40rpx 0rpx;
    }
</style>